import React, { Component } from 'react';

export default class Card extends Component {
    constructor(props) {
        super(props);
        this.state = {};
    }

    render() {
        return (
            <article>
                <div className="subscript" style={{display:this.props.isdiscount?"block":"none"}} >
                    {this.props.discount}
                </div>
                <div className="cont">
                    <div className="top">
                        <div className="icon-desc">
                            <img src={ this.props.icon } alt="" />
                        </div>
                        <p className="context-disc">{this.props.title}</p>
                        <p>{this.props.company}</p>
                        <p className="price"><strong>{this.props.price}</strong><em>{this.props.before_price}</em></p>
                    </div>
                    <div className="bottom">
                        <p>{this.props.description}</p>
                    </div>
                </div>
            </article>
        );
    }
}